<template>
  <div class="close">
    <div>
      <el-form class="oldIndent_nav" ref="dataForm" style="padding-top:5px;">
        <div style="margin-bottom:20px;margin-top:10px;">
          <span style="margin-left:60px">姓名：</span>
          <el-input placeholder="请输入姓名" style="width:200px"></el-input>
          <span style="margin-left:60px">电话号码：</span>
          <el-input placeholder="请输入电话" style="width:200px"></el-input>
          <span style="margin-left:50px">日期:</span>
          <el-date-picker
            type="date"
            placeholder="选择时间"
            format="yyyy 年 MM 月 dd 日"
            value-format="yyyyMMdd"
          ></el-date-picker>
          <span style="margin-left:60px">服务类型：</span>
          <el-select v-model="value" placeholder="请选择">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>
          <el-button type="primary" round style="float:right;margin-right:200px">查询</el-button>
        </div>
      </el-form>
    </div>
    <el-table :data="tableData" border style="width: 100%">
      <el-table-column prop="id" align="center" label="订单号"></el-table-column>
      <el-table-column prop="user" align="center" label="下单用户"></el-table-column>
      <el-table-column prop="phone" align="center" label="联系方式"></el-table-column>
      <el-table-column prop="area" align="center" width="250" label="上门地址"></el-table-column>
      <el-table-column prop="state" align="center" label="服务类型"></el-table-column>
      <el-table-column prop="time" align="center" label="上门时间"></el-table-column>
      <el-table-column prop="money" align="center" label="金额"></el-table-column>
      <el-table-column prop="user2" align="center" label="接单人"></el-table-column>
      <el-table-column prop="star" align="center" label="评分"></el-table-column>
      <el-table-column prop="text" align="center" label="备注"></el-table-column>
    </el-table>
    <!-- 分页 -->
    <el-col :span="24" class="toolbar" style="text-align: center;">
      <el-pagination
        background
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage"
        :page-count="pageNum"
        :page-size="pagesize"
        style="margin-top:30px;margin-bottom:30px"
        layout="total, prev, pager, next, jumper"
        :total="total"
      ></el-pagination>
    </el-col>
  </div>
</template>
<script>
export default {
  data() {
    return {
      currentPage: 1, // 初始页
      pagesize: 10, // 当前页面内的列表行数
      pageCount: 1,
      pageNum: 1, //页数
      total: 4,
      options: [
        {
          value: "1",
          label: "老年护理"
        },
        {
          value: "2",
          label: "术后护理"
        }
      ],
      value: "1",
      tableData: [
        {
          id: "5648621343",
          user: "刘女士",
          phone: "13199451349",
          area: "浙江省杭州市下城区下沙大都会风情苑8幢6单元201室",
          state: "术后护理",
          time: "2019-12-01 19:30",
          text: "无",
          user2: "刘武",
          money: "200元",
          star: "99"
        },
        {
          id: "75531212112",
          user: "吴女士",
          phone: "13195421121",
          area: "浙江省杭州市下城区下沙大都会风情苑1幢4单元302室",
          state: "老年护理",
          time: "2019-12-06 14:00",
          text: "无",
          user2: "王娜",
          money: "300元",
          star: "100"
        },
        {
          id: "4756121233312",
          user: "孟女士",
          phone: "146412125111",
          area: "浙江省杭州市下城区下沙大都会风情苑7幢2单元101室",
          state: "术后护理",
          time: "2019-12-03 19:30",
          text: "无",
          user2: "刘武",
          money: "200元",
          star: "100"
        },
        {
          id: "47865123123",
          user: "王先生",
          phone: "15684231211",
          area: "浙江省杭州市下城区下沙大都会风情苑3幢3单元901室",
          state: "老年护理",
          time: "2019-12-08 16:00",
          text: "无",
          user2: "刘珊",
          money: "300元",
          star: "96"
        }
      ]
    };
  },
  methods: {
    //当前页
    handleSizeChange: function(pagesize) {
      this.pagesize = pagesize;
    },
    // 换页：更新列表数据
    handleCurrentChange: function(currentPage) {
      this.currentPage = currentPage;
    }
  },
  mounted() {}
};
</script>
<style lang="scss" scoped>
.close {
  margin-top: 55px;
}
</style>